<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<input type="text" id="num">
<button onclick="test()">测试</button>
<script type="text/javascript">
	function test(){
		var reg = /^\d*|[;]*|[-]*|[/]*|(\n)*$/g;
		var nm = document.getElementById("num");
		alert(reg.test(nm.value));
	}
	
</script>
</body>
</html>